//
//  WABMSSaveTools.h
//  WonderAnalyticsSDK
//
//  Created by zero on 2021/8/12.
//

#import <Foundation/Foundation.h>
#import "WABMSFMDBHelper.h"

NS_ASSUME_NONNULL_BEGIN

@interface WABMSSaveTools : NSObject

+ (instancetype)shareInstance;

/// 保存信息到 Keychain
/// @param data 信息
/// @param key key
- (void)saveData:(id)data AndKey:(NSString *)key;


/// 从 Keychain 获取信息
/// @param key key
- (id)getDataWithKey:(NSString *)key;


/// 删除 Keychain 对应的信息
/// @param key key
- (void)deleteDataWithKey:(NSString *)key;


/// 保存信息到 缓存 中
/// @param key key
/// @param data 信息
- (void)saveDataToUserDefaultsWithKey:(NSString *)key Data:(id)data;


/// 从缓存中 获取信息
/// @param key key
- (id)getDataToUserDefaultsWithKey:(NSString *)key;


/// 从缓存中删除信息
/// @param key key
- (void)deleteDataToUserDefaultsWithKey:(NSString *)key;


- (void)saveDataToFMDBWithModel:(WABMSFMDBModel *)model;

- (void)deleteDataToFMDBWithModel:(WABMSFMDBModel *)model;

- (void)getDataToFMDBWithBlock:(void(^)(NSArray *arrData))block;

- (NSArray *)getDataToFMDB;

/*
- (void)saveDataToRealmWithModel:(WABMSAnalyticsModel *)model;

- (void)deleteDataToRealmWithModel:(WABMSAnalyticsModel *)model;

 - (RLMResults *)getDataToRealm;
 */

@end

NS_ASSUME_NONNULL_END
